<?php

?>
<script type="text/javascript">

</script>
<style>
    .update_link {
        font-size: 11px; margin-left: 15px;
    }

    #trans_reversal_modal .info {
        text-transform: uppercase;
        font-weight: bold;
    }

    .updatable {
        padding: 3px 5px;
        width: 200px;
        display: inline-block;
        margin-right: 15px;
    }

    .updatable.editing {
        border: solid #ddd 1px;
        background-color: #fff;
        border-radius: 3px;
    }
</style>

<div>
    <h4>Announcements</h4>

    <table id="flex" style="display:none;"></table>

    <div id="announcement_modal" class="modal hide fade">
        <form class="form form-horizontal" method="post" action="" enctype="" style="margin: 0px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4>Send message to all students</h4>
            </div>
            <div class="modal-body">

                <div class="control-group">
                    <label class="control-label" for="password">* Title:</label>
                    <div class="controls">
                        <input id="title" name="title" type="text" value="" required="required" class="input input-large" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="password">* Message:</label>
                    <div class="controls">
                        <textarea id="message" name="message" required="required" rows="5"></textarea>
                    </div>
                </div>
                <input type="hidden" id="id" name="id" value="0" />

            </div>
            <div class="modal-footer">
                <button type="submit" href="<?php echo $this->Html->url(array('action' => 'announcement/save')); ?>" id="announcement_blast_btn" class="btn btn-primary">Send Message</button>
                <a href="#announcement_modal" class="btn" data-toggle="modal">Close</a>
            </div>
        </form>
    </div>

</div>


<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Announcement', 'action' => 'announcement/get')); ?>" />
<input type="hidden" id="table-editable-url" value="<?php echo $this->Html->url(array('controller' => 'Announcement', 'action' => 'announcement/save')); ?>" />
<input type="hidden" id="load_url" value="<?php echo $this->Html->url(array('controller' => 'Announcement', 'action' => 'announcement/load')); ?>" />
<input type="hidden" id="delete_url" value="<?php echo $this->Html->url(array('controller' => 'Announcement', 'action' => 'announcement/delete')); ?>" />

<?php
    echo $this->Html->script('staff/announcement.js');
?>